<form class="checkoutform" action="{:U('update')}" method="post" id="changeform">
    <input type="hidden" name="id" value="{$_GET['id']}"/>
    <input type="hidden" name="member_id"/>
    <input type="hidden" name="member_name"/>
    <input type="hidden" name="name" value="{$list['name']}"/>
</form>
<div class="panel midpanel" style="padding:0;margin:0">
    <header class="panel-heading"> 选择人员<small class="text-muted"> {$list['member_name']}</small></header>
    <div class="panel-body">
        <html:dropdownselect class="memberselect" typelimit="1" selected="{$list['member_id']}" listloaded="listloaded" name="member" style="height:auto; width:auto;" multi="0" action="{:U('Team/membergroup')}" title="选择员工" placeholder="点击修改管理人员" />
          <style>
			  .selectlist{margin:0; padding:0;}
			  .selectlist li{list-style-type:none; margin:0; padding:0;padding:5px; border-bottom:1px solid #eee; margin:0 8px;}
			  .selectlist li:hover{background:#eee;}
		  </style>
        <div id="reselectlayout" style="top:0; display:none; left:0; bottom:0; right:0; position:fixed; z-index:4999;">
        </div>
        <!--<div class="membertreebox"></div>-->
        <!--<div class="ztree" style="padding:15px;" id="membertree"></div>-->
    </div>
</div>
<script type="text/javascript">
console.log($(".checkoutform"));
function listloaded(){
    $('.selectitem').click(function(){
        if($(this).prev('em').length==0){
			$("#changeform input[name='member_id']").val($(this).find('input').eq(1).val());
			$("#changeform input[name='member_name']").val($(this).find('input').eq(0).val());
        }
    });
    $('.memberselect').blur(function(){
		$.post($("#changeform").attr('action'),$("#changeform").serialize(),function(data){
			console.log(data);	
		},'json');	
	});
}

//点击‘X’清除赋值
$('.itemspan a').click(function(){
	$("#changeform input[name='member_id']").val('');
});

$(window).trigger('load');
</script>